<?php
	$sql=array();

	$sql[] = "CREATE TABLE IF NOT EXISTS `{_DB_PREFIX_}regional_carrier_services` (" .
		 "`id` INT(11) NOT NULL AUTO_INCREMENT," .
         "`id_carrier` INT (10) NOT NULL DEFAULR 0,".
		 "`name` VARCHAR(255) NOT NULL," .
		 "`min_weight` DECIMAL(15,3) NOT NULL DEFAULT 0," .
		 "`max_weight` DECIMAL(15,3) NOT NULL DEFAULT 0," .
		 "`min_cost` DECIMAL(15,3) NOT NULL DEFAULT 0," .
		 "`max_cost` DECIMAL(15,3) NOT NULL DEFAULT 0," .
		 "`state_id` INT(11) DEFAULT NULL," .
		 "`country_id` INT(11) DEFAULT NULL," .
		 "PRIMARY KEY(`id`)," .
		 "INDEX `weight`(`min_weight`, `max_weight`)," .
		 "INDEX `cost`(`min_cost`, `max_cost`)," .
         "INDEX `country_index` (`country_id`),".
         "INDEX `state_index` (`state_id`),".
         "INDEX `carrier_id` (id_carrier)".
		 ") ENGINE={_MYSQL_ENGINE_} DEFAULT CHARSET=utf8;";

	$sql[] = "CREATE TABLE IF NOT EXISTS `{_DB_PREFIX_}regional_carrier_limits` (" .
		 "`id` INT(11) NOT NULL AUTO_INCREMENT," .
		 "`id_regional_carrier_service` INT(11) NOT NULL," .
		 "`carrier_limit` DECIMAL(15,3) NOT NULL DEFAULT 0," .
		 "`cost` DECIMAL(15,3) NOT NULL DEFAULT 0," .
		 "PRIMARY KEY(`id`)," .
		 "INDEX service_id(`id_regional_carrier_service`)" .
		 ") ENGINE={_MYSQL_ENGINE_} DEFAULT CHARSET=utf8;";
